Carbon


KCLock

Header: Keychain.h Carbon status: Under Evaluation

Displays a dialog box that prompts the user for a password in order before locking keychain.

OSStatus KCLock (
    KCRef keychain
);
Parameter descriptions
keychain

A reference to the keychain to lock. Pass NULL to lock all unlocked keychains.

function result

A result code. The result code errKCNoSuchKeychain indicates that specified keychain could not be found. The result code errKCInvalidKeychain indicates that the specified keychain is invalid.

DISCUSSION

If a keychain is unlocked, the KCLock function displays a dialog box prompting the user for their password in order to lock a keychain. Your application should not call KCLock unless you are responding to a user's request to lock a keychain. In general, you should leave the keychain unlocked so that the user does not have to unlock it again in another application.

VERSION NOTES

KCLock replaces the function KCLockKeychain, which was available in Keychain Manager 1.0.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)